#include <iostream>

using namespace std;

int f(int x,int y,int z)
{
    int cnt=0;
    int t=y+z;
    if(x/2>=t)
    {
        cnt+=t;
        x-=(t)*2;
        cnt+=x/3;
        if(x%3)cnt++;
    }
    else
    {
        cnt+=x/2;
        t-=x/2;
        t+=x%2;
        cnt+=t/2;
        if(t%2)cnt++;
    }
    return cnt;
}

int main()
{
    int x,y,z;
    while(cin>>x>>y>>z)
    {
        cout<<f(x,y,z)<<endl;
    }
    return 0;
}
